package com.yswy.app.controller;

import com.yswy.app.service.VipPriceService;
import com.yswy.common.model.ResultModel;
import com.yswy.domain.entity.AppUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

import static com.yswy.domain.common.util.TokenUtils.getChannle;
import static com.yswy.domain.common.util.TokenUtils.getUser;

@RestController
@RequestMapping("/vip")
@Api(description = "vip")
public class VipController {
    @Autowired
    private VipPriceService vipPriceService;

    @RequestMapping(value = "getVipHome", method = RequestMethod.GET)
    @ApiOperation(value = "获取vip页面数据")
    public ResultModel getVipHome(HttpServletRequest request){
        return vipPriceService.getVipPage(getUser(request) );
    }




}
